package com.wqiuqiu.gulimall.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wqiuqiu.common.PageUtils;
import com.wqiuqiu.gulimall.member.entity.MemberReceiveAddressEntity;
import com.wqiuqiu.gulimall.member.vo.FareAddressVo;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 会员收货地址
 *
 * @author wqiuqiu
 * @email 18773489795@163.com
 * @date 2023-11-29 12:11:20
 */
public interface MemberReceiveAddressService extends IService<MemberReceiveAddressEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 根据会员id找出该会员的全部地址
     * @param memberId
     * @return
     */
    List<MemberReceiveAddressEntity> infoByMemberId(Long memberId);

    /**
     * 根据地址来计算运费,这里简单模拟，并没有真正实现，默认使用第一个地址的手机号码的最后一个数字为运费
     * @param addrId
     * @return 运费和地址
     */
    FareAddressVo getFareAndAddress(Long addrId);
}

